//
// Created by Administrator on 2017/3/13.
//

#ifndef HELLO_MYCLASS_H
#define HELLO_MYCLASS_H

struct _MyObject;

typedef struct _MyClass{
    struct _MyObject *(*_new)();
    void (*_delete)(struct _MyObject*);
    void (*init)(struct _MyObject*);
    void (*destruct)(struct _MyObject*);
    void (*set_data)(struct _MyObject*, int size, void *data);
    void *(*get_data)(struct _MyObject*);
    int (*work)(struct _MyObject*);
    void (*release)(struct _MyObject*);
} MyClass;

typedef struct _MyObject{
    MyClass *classptr;
} MyObject;

extern MyClass SubClass;

typedef struct _SubClass_Object{
    MyObject _myobject;
    void *data;
} SubClassObject;



#endif //HELLO_MYCLASS_H
